function queryParams(params) {
	return {
		roleName: $('#roleName').val(),
	};
}
$('#reset').click(function() {
		 $('#roleName').val(""),
		 $('#Role').bootstrapTable('refresh', {url: '../RoleController/findByCondition.action'});  
		 
});
function formatValue(value){
    if(value==0){
     value="可用"; 
    }
    else if(value==1){
      value="禁用";
    }
    return value;
  }

$(function() {
	$("#RoleForm").validate({
		rules: {		
			roleName:"required",  
		},
		errorPlacement: function (label, element) {
            $(element).tooltip('destroy'); /*必需*/
            $(element).attr('title', $(label).text()).tooltip('show'); 
        },
	});
	init('Role',500,300,"roleId","角色");
});




